<!DOCTYPE html>
<html lang="en"><head>
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript">
        function dateFormat (date, fmt) { //author: meizz

            if(!(date instanceof Date))
            {
                if(date==undefined||(date.trim()+"")=="")return "";
                date = parseTime(date);
            }

            var o = {
                "M+": date.getMonth()+1, //月份
                "d+": date.getDate(), //日
                "h+": date.getHours(), //小时
                "m+": date.getMinutes(), //分
                "s+": date.getSeconds(), //秒
                "q+": Math.floor((date.getMonth() + 3) / 3), //季度
                "S": date.getMilliseconds() //毫秒
            };
            if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
            for (var k in o)
                if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
            return fmt;
        }

        function showTime(){
            JSON
            x = document.getElementById("curTime");
            x.innerHTML = dateFormat(new Date(),"yyyyMMdd hh:mm:ss");
        }
    </script>
</head>
<body>
<button onclick="showTime()" id="btn">点我查看时间</button>
<h3></h3>
<div id="main">
    请选择商品：全选<input type="checkbox" id="chooseAll" name="chooseAll">
    <br>

    洗衣机<input type="checkbox" name="product" value="3000">
    笔记本电脑<input type="checkbox" name="product" value="4000">
    华为mate10 pro<input type="checkbox" name="product" value="5000">
    <br><br>

    <table id="mytable" border="1">
        <tbody><tr>
            <th>id</th>
            <th>name</th>
        </tr>
        <tr>
            <td style="cursor: pointer; background-color: rgb(255, 255, 255);">1</td>
            <td style="cursor: pointer; background-color: rgb(255, 255, 255);">Jack</td>

        </tr>
        </tbody></table>

    <p>111111111111111</p><span id="curTime">20180127 14:53:34</span></div>

</body></html>